package com.ia.aistream.service.dxfcomponent;

import com.ia.aistream.model.common.entity.CommonFile;
import com.ia.aistream.model.dxfcomponent.dto.DrawDto;
import com.ia.aistream.model.dxfcomponent.entity.DwgAnalysis;
import com.ia.aistream.model.dxfcomponent.entity.DxfDraw;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * 处理图纸解析的业务规则
 * @Author xiaoyu
 * @create 2020/12/8 10:46
 */
public interface DrawAnalysisService {

    /***
     * 获取所有解析后的索引信息
     * @param dxfDraw
     * @return
     */
    public List<DxfDraw> getDxfDraw(DxfDraw dxfDraw);

    /***
     * 根据上传的dwg文件，将索引信息提取
     * @param commonFile
     * @return
     * @throws Exception
     */
    public List<DxfDraw> getDrawIndexService(MultipartFile[] commonFile) throws Exception;

    /***
     * 根据前台传入的文件的ID，将
     * @param fileId
     * @return
     */
    public Map<String,Object> getDrawComponentService(Long fileId);

    /***
     * 实现设备信息的批量添加
     * @param drawDto
     * @return
     */
    public Integer insertBatchService(DrawDto drawDto);

    /***
     * 查找转化后图片的地址
     * @param fileId
     * @return
     */
    public String getImgPathService(Long fileId);

    /***
     * 删除索引信息
     * @param fileId
     * @return
     */
    public int deleteDrawService(long fileId);

    /**
     * 判断图片是否存在
     * @param id
     * @return
     */
    public boolean checkDxfImg(Long id);
}
